package com.linktel.rpcEasy.provider;


import com.linktel.rpcEasy.RpcApplication;
import com.linktel.rpcEasy.config.RpcConfig;
import com.linktel.rpcEasy.provider.service.UserService;
import com.linktel.rpcEasy.registry.LocalRegistry;
import com.linktel.rpcEasy.server.HttpServer;
import com.linktel.rpcEasy.server.VertxHttpServer;
import lombok.extern.slf4j.Slf4j;

/**
 * 简易服务提供者示例
 */
public class EasyProviderExample {

    public static void main(String[] args) {
        RpcApplication.init();
        LocalRegistry.register(UserService.class.getName(), UserServiceImpl.class);
        // 提供服务
        HttpServer httpServer = new VertxHttpServer();

        httpServer.doStart(RpcApplication.getRpcConfig().getServerPort());
    }

}
